package com.qkm.xinguan.repository;

/**
 * @author zfj
 * @date 2021/12/28 -21:26
 */
import com.qkm.xinguan.domain.entity.Comment;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

//评论的持久层接口
public interface CommentRepository extends MongoRepository<Comment,String> {
	//根据父id，查询子评论的分页列表
	Page<Comment> findByParentid(String parentid, Pageable pageable);

	//根据商品id，查询评论的分页列表
	Page<Comment> findByArticleid(String articleid, Pageable pageable);

}
